


global _DllMain 

section .data
LC0:
	db "check stack fail!",0ah,0

LC1:
	db "Who Are You?",0
	
LC2:
	db "This Is From APC!",0

extern _MessageBoxA,_printf,_exit
section .text 
_DllMain:
	push ebp
	mov ebp,esp 
	sub esp,0x1000
	push ebx
	push esi 
	push edi

	; [ebp+8] hModule
	; [ebp+12] ul_reason_for_call
	; [ebp+16] lpReserved 
	
	mov eax,[ebp+12] ; ul_reason_for_call
	cmp dword [ebp+12], 1 ; DLL_PROCESS_ATTACH
	jne .Lmain_20
	
	mov esi,esp 
	push 48
	push LC2 
	push LC1 
	push 0 
	call _MessageBoxA 
	cmp esi,esp
	call _cs 
	
.Lmain_20:
	mov eax,1
	pop edi
	pop esi 
	pop ebx 
	add esp,0x1000 
	leave
	ret 
	
_cs:
	je .Lcs_0
	
	push LC0
	mov eax,0
	call _printf 
	
	push 0
	call _exit 
		
.Lcs_0:
	ret 